#include <iostream>
#include <vector>
#include <thread>

class obj_func
{
private:
    int a;

public:
    obj_func():a(0){}

    void start_thread(){
        std::thread([this](){
            this->a ++;
        });
    }

    void operator()(int a)
    {
        std::cout << "hello obj " << a++ << std::endl;
    }
};

void func(){
    static int a = 0;
}

int main(int argc, char const *argv[])
{

    obj_func *func = new obj_func();
    for (int i = 0; i < 10; i++)
    {
        (*func)(i);
    }


    int a = 0;
    auto f = [&a]()
    {
        std::cout << "hello lamd " << a++ << std::endl;
    };

    for (int i = 0; i < 10; i++)
    {
        f();
    }

    int a = 1;

    return 0;
}
